<template>
	<view class="pl52 pr52">
		<view class="">
			<view class="fs58 fw mt40">修改密码</view>
			<view class="mobilebox pl40 pr40 mt70">
				<u-input v-model="form.oldpass" type="number" :border="false" height="90" placeholder="请输入原密码"/>
			</view>
			<view class="pwdbox pl40 mt30 pr30">
				<u-input v-model="form.loginpass" type="password" :border="false" height="90" placeholder="请输入新登录密码"/>
			</view>
			<view class="pwdbox pl40 mt30 pr30">
				<u-input v-model="form.quepass" type="password" :border="false" height="90" placeholder="请确认密码"/>
			</view>
			<view class="mt50 fs30" >
				<u-button type="primary" shape="circle" class="" @click="submit">提交</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad() {
		},
		data() {
			return {
				form:{
					oldpass:'',
					loginpass:'',
					quepass:''
				},
			};
		},
		methods:{
			submit() {
				if(this.form.loginpass==this.form.quepass) {
					this.$api.changePass(this.form).then(res=>{
						this.$msg(res.msg)
						setTimeout(()=>{
							uni.navigateBack({
								
							})
						},800)
					})
				}else {
					this.$msg('两次密码输入不一致,请重新输入')
				}
			}
		}
	}
</script>

<style lang="scss">
page {
	background-color: #FFFFFF;
}
.mobilebox,
.pwdbox {
	width: 100%;
	height: 90rpx;
	background: #F8F8F8;
	border-radius: 50rpx;
	
}
</style>
